package com.yy.glide.load;

import com.yy.glide.Key;
import com.yy.glide.load.data.DataFetcher;

/**
 * @param <Model> 数据来源
 * @param <Data>  数据类型
 */
public interface ModelLoader<Model, Data> {
    class LoadData<Data> {
        Key mKey;
        DataFetcher<Data> mDataDataFetcher;

        public LoadData(Key key, DataFetcher<Data> dataDataFetcher) {
            mKey = key;
            mDataDataFetcher = dataDataFetcher;
        }
    }

    boolean handle(Model model);

    LoadData buildData(Model model);
}
